#include <iostream>
using namespace std;
class Rational
{
    private:
    int numarator;
    int numitor;
    public:
    Rational();
    Rational(int x, int y);
    friend ostream& operator<<(ostream& afiseaza, const Rational& x);
    int getNumarator();
    int getNumitor();
    void setNumarator(int x);
    void setNumitor(int x);
    int ncomun(Rational x);
    Rational simplificare();
    Rational operator+(Rational x);
    Rational operator-(Rational x);
    Rational operator/(Rational x);
    Rational operator*(Rational x);
    bool operator==(Rational x);
    bool operator<(Rational x);
    bool operator>(Rational x);
    bool operator<=(Rational x);
    bool operator>=(Rational x);
};
class sirRational
{
    private:
    Rational sir[100];
    public:
    sirRational(Rational v[100]);
    Rational getElement(int i);
    int nrElemente();
    Rational suma();
    void ireductibil();
    void ordonare();
    void afiseaza();
};

